package com.belazy.library.util.constant;

import java.util.regex.Pattern;

/**
 * @Description <p> 系统常用正则常量类</p>
 * @Author chupeng.tang
 * @CreateTime 2023/5/19 17:29
 * @Version 1.0
 */
public interface RegexConstant {
    //数字可以带负号和小数点
    String NUMBER_TOW = "^-?[0-9]+(.[0-9]+)$";
    //纯数字
    String LETTER = "[0-9]+";
    //纯字母
    String NUMBER = "[a-zA-Z]+";
    //校验台湾身份证
    String ID_CARD_A = "^[a-zA-Z][0-9]{9}$";
    //校验澳门身份证
    String ID_CARD_B = "^[1|5|7][0-9]{6}\\(?[0-9A-Z]\\)?$";
    //校验香港身份证
    String ID_CARD_C = "^[A-Z]{1,2}[0-9]{6}\\(?[0-9A]\\)?$";
    //邮箱正则
    String EMAIL = "^[a-z0-9]([a-z0-9]*[-_\\.\\+]?[a-z0-9]+)*@([a-z0-9]*[-_]?[a-z0-9]+)+[\\.][a-z]{2,3}([\\.][a-z]{2,4})?$";
    //检测身份证格式是否正确正则
    String CARD_ID = "^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}(\\d|X|x)$";
    //中文字符正则
    String CHINA_TEXT = "[\\u4e00-\\u9fa5]+";
    //手机号正则
    String PHONE_CHINA_TELECOM = "^1[3578][01379]\\d{8}$";
    String PHONE_CHINA_UNION = "^1[34578][01256]\\d{8}$";
    String PHONE_CHINA_MOBILE = "^(134[012345678]\\d{7}|1[34578][012356789]\\d{8})$";
    //正则表达式：验证非零的正整数
    Pattern PATTERN = Pattern.compile ("^[0-9]*$");
    //正则表达式：验证是否为所要求的金额类型
    Pattern PATTERN_SENCOND = Pattern.compile ("^(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))$");

}
